package com.example.multilevelapprovalback.controller;

import com.example.multilevelapprovalback.pojo.Result;
import com.example.multilevelapprovalback.pojo.User;
import com.example.multilevelapprovalback.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.time.Year;
import java.util.List;

/**
 * 用户管理
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private UserService userService;

    /**
     * 查询所有用户
     * @return
     */
    @GetMapping
    public Result getAllUser() {
        Object list = userService.getAllUser();
        return Result.success(list);
    }
}
